import { network } from '@/utils';
import { AreaFunctionListParams, operActionParams } from './data';

import { business } from '../../../../../config/Apis';

export async function queryAreaFunctionList(params: AreaFunctionListParams) {
  return network.get(business.gardenBiz_list, { params });
}

export async function queryGardenList(params: any) {
  params = {
    ...params,
    pageIndex: 1,
    pageSize: 1000,
  };
  return network.get(business.garden_list, {
    params,
  });
}

export async function operActionServices(params: operActionParams) {
  return network.put(business.gardenBiz_status, { data: params });
}

export async function operActionDelete(params: { id: number}) {
  return network.deleter(business.gardenBiz, { params });
}
